import React from "react";
import { RouteObject } from "@/routes/interface";
import Layout from "@/layouts";
import lazyLoad from "@/routes/utils/lazyLoad";

const product: Array<RouteObject> = [
	{
		element: <Layout />,
		meta: {
			title: "优惠活动",
			key: "discount"
		},
		children: [
			{
				path: "/discount",
				element: lazyLoad(React.lazy(() => import("@/pages/discount/List/index"))),
				meta: {
					title: "优惠活动",
					requiresAuth: true,
					key: "courses",
					icon: ""
				}
			},
			{
				path: "/discount/detail",
				element: lazyLoad(React.lazy(() => import("@/pages/discount/Detail/index"))),
				meta: {
					title: "优惠券详情",
					requiresAuth: true,
					key: "/discount/detail",
					icon: ""
				}
			},
			{
				path: "/discount/create",
				element: lazyLoad(React.lazy(() => import("@/pages/discount/Create/index"))),
				meta: {
					title: "创建优惠券",
					requiresAuth: true,
					key: "/discount/create",
					icon: ""
				}
			}
		]
	}
];

export default product;
